﻿@using SmartStore.Web.Models.Boards;
@model LastPostModel
@if (Model.Id > 0)
{
	<div class="last-post text-muted">
		<div class="createdon">@Model.PostCreatedOnStr</div>
		@if (Model.ShowTopic)
		{
			<div>
				<div class="d-inline-flex">
					<span>@T("Forum.In"):&nbsp;</span>
					@Html.RouteLink(Model.ForumTopicSubject.Truncate(24, "…"), "TopicSlug", new { id = Model.ForumTopicId, slug = Model.ForumTopicSeName }, new { title = Model.ForumTopicSubject })
				</div>
			</div>
		}
		@if (Model.CustomerId > 0)
		{
			<div>
				<div class="d-inline-flex">
					<span class="pr-1">@T("Forum.By"):</span>
					@if (Model.AllowViewingProfiles && !Model.IsCustomerGuest)
					{
						@Html.RouteLink(Model.CustomerName, "CustomerProfile", new { Id = Model.CustomerId })
					}
					else
					{
						<span>@Model.CustomerName</span>
					}
				</div>
			</div>
		}
    </div>
}
else
{
    <div class="nopost text-muted">
        @T("Forum.NoPosts")
    </div>
}
